package cn.tedu.csmall.passport.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 管理员登录日志
 * </p>
 *
 * @author xBest
 * @since 2023-04-01
 */
@TableName("ams_login_log")
public class LoginLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 管理员id
     */
    private Long adminId;

    /**
     * 管理员用户名（冗余）
     */
    private String username;

    /**
     * 管理员昵称（冗余）
     */
    private String nickname;

    /**
     * 登录IP地址
     */
    private String ip;

    /**
     * 浏览器内核
     */
    private String userAgent;

    /**
     * 登录时间
     */
    private LocalDateTime gmtLogin;

    /**
     * 数据创建时间
     */
    private LocalDateTime gmtCreate;

    /**
     * 数据最后修改时间
     */
    private LocalDateTime gmtModified;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }
    public LocalDateTime getGmtLogin() {
        return gmtLogin;
    }

    public void setGmtLogin(LocalDateTime gmtLogin) {
        this.gmtLogin = gmtLogin;
    }
    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }
    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "LoginLog{" +
            "id=" + id +
            ", adminId=" + adminId +
            ", username=" + username +
            ", nickname=" + nickname +
            ", ip=" + ip +
            ", userAgent=" + userAgent +
            ", gmtLogin=" + gmtLogin +
            ", gmtCreate=" + gmtCreate +
            ", gmtModified=" + gmtModified +
        "}";
    }
}
